<div id="tabs">
	<ul>
        <ul>
        <li><?php echo $this->Html->link(__('Thời gian', true), array('controller' => 'kehoaches', 'action' => 'theodoikehoach',$kh['Kehoach']['donvi_id'])); ?>
         </li>
        <li id="current">
        <?php
        echo $this->Html->link(__('Ds các CV', true), array('action' => 'index',$kehoach)); 
             
        ?>
        </li>
	
		
	</ul>
</div>
<div class="nvchithis">
	<h2><?php 
            echo $kh['Donvi']['tendv'].'<br></h2>';
            
            echo '<h5>Các công việc theo nội dung công văn, chỉ thị </h5>';
           
            echo '<h4>';
 
            echo $kh['Thoigian']['tentg'];
            echo ' Từ:'.$kh['Thoigian']['ngaybd'].' đến '.$kh['Thoigian']['ngaykt'].'</h4>';
    ?>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
				<th><?php echo $this->Paginator->sort('STT');?></th>
		
			<th><?php echo $this->Paginator->sort('Người thực hiện','nhanvien_id');?></th>
            <th><?php echo $this->Paginator->sort('Nội dung công việc','congviec');?></th>
			
			<th><?php echo $this->Paginator->sort('Đơn vị tính','dvt_id');?></th>
			
			<th><?php echo $this->Paginator->sort('Hạn hoàn thành','thoihan');?></th>
			<th><?php echo $this->Paginator->sort('KQ cần đạt','danhgia');?></th>
            <th><?php echo $this->Paginator->sort('KQ thực hiện','ketqua');?></th>
            <th><?php echo $this->Paginator->sort('Trạng thái','ketqua');?></th>
		
	</tr>
	<?php
	$i = 0;
	foreach ($nvchithis as $nvchithi):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $i;// $nvchithi['Nvchithi']['id']; ?>&nbsp;</td>
	
		<td>
			<?php echo $this->Html->link($nvchithi['Nhanvien']['tennv'], array('controller' => 'nhanviens', 'action' => 'view', $nvchithi['Nhanvien']['id'])); ?>
		</td>
	
		<td><?php echo $nvchithi['Nvchithi']['congviec']; ?>&nbsp;</td>
        	<td>
			<?php echo $this->Html->link($nvchithi['Dvt']['donvitinh'], array('controller' => 'dvts', 'action' => 'view', $nvchithi['Dvt']['id'])); ?>
		</td>
		<td><?php echo $nvchithi['Nvchithi']['thoihan']; ?>&nbsp;</td>
		<td><?php echo $nvchithi['Nvchithi']['danhgia']; ?>&nbsp;</td>
 	    <td><?php echo $nvchithi['Nvchithi']['ketqua']; ?>&nbsp;</td>
        <td><?php 
                if($nvchithi['Nvchithi']['dagiao']==1)
                    echo 'Đã giao';
                elseif($nvchithi['Nvchithi']['dagiao']==2)
                    echo '<font color="#C61414"><strong>Đã duyệt</strong></font>';
                else
                    echo '<font color="#161414"><strong>Chưa giao</strong></font>'; 
         ?>&nbsp;</td>
	
	
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện có %count% công việc theo kế hoạch', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
